Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve Task Progression and Error in Guided Templates #6074

Merged
merged 4 commits into from
Jan 20, 2024

Conversation

sanjacornelius
Copy link
Contributor

@sanjacornelius sanjacornelius commented Jan 18, 2024

This PR addresses an ongoing bug in CI servers related to task progression and error handling in Guided Templates. The issues included a 422 error indicating the task was already closed, replication of closed tasks displaying, and incorrect task statuses (In Progress instead of Completed) upon completion.

Cause

  1. The component was not automatically progressing to the next task.
  2. An error was thrown from Screen Builder upon closing the first task, with an unknown getScreenEndpoint message.

Solution

  1. Removed the initial getNextTask method and allow the component progresses correctly.
  2. Updated the conditional to check if the getScreenEndpoint variable exists, preventing an error and allowing the component to progress.

How to Test

  1. Install the latest Send Email Connector.
  2. Symlink the latest Screen Builder.
  3. Run php artisan processmaker:sync-guided-templates.
  4. Navigate to Processes > Guided Templates.
  5. Select a guided template.
  6. Click 'Start Now' and complete the process (use 'Skip' if needed).
  7. Verify no 422 errors occur.
  8. Confirm that previously closed tasks do not replicate.
  9. After completing the process, check Requests to ensure it has a status of 'Completed'.

Related Tickets & Packages

ci:next
ci:screen-builder:observation/FOUR-13331

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

This refactor utilizes the <task> component methods to progress to the next task. The implementation of getNextTask was initially necessary due to the <task> component not automatically progressing, which was later found to be caused by an error in the screen builder being emitted.
Copy link

@eiresendez eiresendez self-requested a review January 19, 2024 16:47
Copy link
Contributor

@eiresendez eiresendez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No console errors or XHR errors. The requests are marked as 'completed' at the end of the entire process. I tested with all the plugins installed and the screen builder linked locally

@ryancooley ryancooley merged commit df8de3c into next Jan 20, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants